<template>
  <div>
    <!-- 绝缘 -->
    <!-- 样本基本参数卡片视图区域 -->
    <!-- <h>绝缘页面insulation_parameter</h> -->
    <el-card class="box-card">
      <el-row :gutter="20">
        <!-- 高级查询 -->
        <el-col :span="2" style="margin-top: 4px">
          <advancedSearch ref="advancedSearch" @getRef="getTableRef" @getInquiryResult="getTableInquiryResult" @resetQuery="resetQuery"></advancedSearch>
        </el-col>
        <!-- 快速查询 -->
        <el-col :span="2" style="margin-top: 4px">
          <fastSearch ref="fastSearch" :importDataType="'绝缘性能'" @getFastResult="getTableFastResult" @resetQueryKs="resetQueryKs"></fastSearch>
        </el-col>
        <!-- 导入 -->
        <!-- <el-col :span="2" style="margin-top: 4px"> -->
          <!-- <el-button type="primary" size="mini" @click="showImport('绝缘批量导入模板', 0)">导入</el-button> -->
          <!-- <el-button type="primary" size="mini" @click="showEdit()">导入</el-button> -->
          <!-- <importBox ref="importBox" :importFlag="'软磁批量导入模板'" :fileFlag= 0 :importDataType="'绝缘'" @getTableColumn="getTableColumn" :headerOptions="headerOptions"></importBox> -->
        <!-- </el-col> -->
        <!-- 排序规则 -->
        <el-col :span="4" style="margin-top: 4px">
          <el-select size="mini" v-model="sortValue" @change="selectSort" clearable placeholder="选择排序规则">
            <el-option v-for="item in sortOptions" :key="item.value" :label="item.label" :value="item.value"> </el-option>
          </el-select>
        </el-col>
      </el-row>
      <!-- 固态 -->
      <el-table ref="jueYuanTable" :data="parameterData" height="500px" style="margin: 10px 0 10px" border @sort-change="tableGetSortChange" class="mainTable">
        <el-table-column label-class-name="DisabledSelection" type="selection" fixed="left" width="40"> </el-table-column>
        <el-table-column :render-header="renderHeader" label-class-name="sortableShow" sortable="custom" align="center" label="编号" prop="parameterId" width="90px"></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="牌号" prop="grade" width="150px" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="样品规格" min-width="4%" prop="specification" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="国别" min-width="4%" prop="country" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="生产商" min-width="4%" prop="manufacturer" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="执行标准" min-width="4%" prop="standard" width="120px" show-overflow-tooltip>
          <template slot-scope="scope">
            <el-button type="text" size="mini" @click.native.stop="downLoadFileName(scope.row.standard)">{{ scope.row.standard }}</el-button>
          </template>
        </el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="样品种类" min-width="4%" prop="type" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="密度/(kg/m³)" min-width="4%" prop="density" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="厚度/mm" min-width="4%" prop="thickness" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="绝缘电阻/Ω" min-width="4%" prop="insulationResistance" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="体积电阻/Ω" min-width="4%" prop="volumeResistance" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="介电常数" min-width="4%" prop="dielectricConstant" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="介质损耗因数" min-width="4%" prop="dielectricDissipationFactor" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="击穿电压/V" min-width="4%" prop="breakdownVoltage" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="耐受电压/V" min-width="4%" prop="withstandVoltage" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="电气强度/(V/mm)" min-width="4%" prop="electricStrength" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="局部放电起始电压/V" min-width="4%" prop="partialDischargeInceptionVoltage" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="局部放电熄灭电压/V" min-width="4%" prop="partialDischargeExtinctionVoltage" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="导热系数/(W/(m*K))" min-width="4%" prop="thermalConductivity" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="玻璃化转变温度/℃" min-width="4%" prop="glassTransitionTemperature" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" sortable="custom" align="center" label="入库日期" min-width="4%" prop="inDate" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="样品柜编号" min-width="4%" prop="cabinetNumber" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="项目组" min-width="4%" prop="projectGroup" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="样品提供人" min-width="4%" prop="sampleProducer" show-overflow-tooltip></el-table-column>
        <el-table-column :render-header="renderHeader" align="center" label="备注" min-width="4%" prop="remarks" show-overflow-tooltip></el-table-column>
      </el-table>
      <!-- 分页区 -->
      <!-- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="queryInfo.pageNum" :page-sizes="[10, 20]" :page-size="queryInfo.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total"> </el-pagination> -->
    </el-card>

  </div>
</template>

<script>
import * as echarts from 'echarts'
import { Message } from 'element-ui'
import advancedSearch from './components/advancedSearch.vue'
import fastSearch from './components/fastSearch.vue'
import importBox from './components/importBox.vue'
import singleImportNew from './components/singleImportNew.vue'
import categoryFilter from './components/categoryFilter.vue'
import measureDetailed from './components/measureDetailed.vue'

export default {
  components: {
    advancedSearch,
    fastSearch,
    measureDetailed,
    importBox,
    singleImportNew,
    categoryFilter
  },
  data() {
    return {
      /*************** 操作部分 *********************/
      isOperationShow: false,
      /*************** 操作部分 *********************/
      // parameterList: [],
      parameterData: [],
      parameterListReverse: [],
      parameterList: [
        {
          parameterId: '1175',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '720@150℃',
          thickness: '0.05',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '1.6@60Hz',
          dielectricDissipationFactor: '0.004@60Hz',
          breakdownVoltage: '900',
          withstandVoltage: '1950',
          electricStrength: '18000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.103@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1176',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '810@150℃',
          thickness: '0.08',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '1.6@60Hz',
          dielectricDissipationFactor: '0.005@60Hz',
          breakdownVoltage: '1760',
          withstandVoltage: '3120',
          electricStrength: '22000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.114@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1177',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '830@150℃',
          thickness: '0.10',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '1.8@60Hz',
          dielectricDissipationFactor: '0.006@60Hz',
          breakdownVoltage: '2100',
          withstandVoltage: '3600',
          electricStrength: '21000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.117@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1178',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '880@150℃',
          thickness: '0.13',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '2.4@60Hz',
          dielectricDissipationFactor: '0.006@60Hz',
          breakdownVoltage: '3640',
          withstandVoltage: '7150',
          electricStrength: '28000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.123@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1179',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '950@150℃',
          thickness: '0.18',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '2.7@60Hz',
          dielectricDissipationFactor: '0.006@60Hz',
          breakdownVoltage: '6120',
          withstandVoltage: '9900',
          electricStrength: '34000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.143@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1180',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '960@150℃',
          thickness: '0.25',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '2.7@60Hz',
          dielectricDissipationFactor: '0.006@60Hz',
          breakdownVoltage: '8250',
          withstandVoltage: '15750',
          electricStrength: '33000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.139@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1181',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '990',
          thickness: '0.30',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '2.9@60Hz',
          dielectricDissipationFactor: '0.007@60Hz',
          breakdownVoltage: '10200',
          withstandVoltage: '未知',
          electricStrength: '34000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1182',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '1020@150℃',
          thickness: '0.38',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3.2@60Hz',
          dielectricDissipationFactor: '0.007@60Hz',
          breakdownVoltage: '12540',
          withstandVoltage: '20900',
          electricStrength: '33000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.149@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1183',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '1060@150℃',
          thickness: '0.51',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3.4@60Hz',
          dielectricDissipationFactor: '0.007@60Hz',
          breakdownVoltage: '16320',
          withstandVoltage: '28050',
          electricStrength: '32000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.157@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1184',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '1140',
          thickness: '0.61',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3.7@60Hz',
          dielectricDissipationFactor: '0.007@60Hz',
          breakdownVoltage: '19520',
          withstandVoltage: '未知',
          electricStrength: '32000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1185',
          grade: 'NomexT410',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '皱纹纸',
          density: '1080@150℃',
          thickness: '0.76',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3.7@60Hz',
          dielectricDissipationFactor: '0.007@60Hz',
          breakdownVoltage: '20520',
          withstandVoltage: '37240',
          electricStrength: '27000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.175@150℃', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1186',
          grade: 'Kapton 100CRC',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1550',
          thickness: '0.0254',
          insulationResistance: '未知',
          volumeResistance: '>1.00E+16',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.002@1000Hz',
          breakdownVoltage: '6502.4',
          withstandVoltage: '未知',
          electricStrength: '256000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1187',
          grade: 'Kapton 110ECRC074',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1611',
          thickness: '0.0280',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '未知',
          dielectricDissipationFactor: '未知',
          breakdownVoltage: '5628',
          withstandVoltage: '未知',
          electricStrength: '201000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1188',
          grade: 'Kapton 150FCRC019',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1740',
          thickness: '0.0380',
          insulationResistance: '未知',
          volumeResistance: '>1.00E+16',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.002@1000Hz',
          breakdownVoltage: '6574',
          withstandVoltage: '未知',
          electricStrength: '173000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1189',
          grade: 'Kapton 120FN616',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1530',
          thickness: '未知',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3.1',
          dielectricDissipationFactor: '0.0015',
          breakdownVoltage: '未知',
          withstandVoltage: '未知',
          electricStrength: '272000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1190',
          grade: 'Kapton 150FN019',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1670',
          thickness: '未知',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '2.7',
          dielectricDissipationFactor: '0.0013',
          breakdownVoltage: '未知',
          withstandVoltage: '未知',
          electricStrength: '197000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1191',
          grade: 'Kapton 250FN029',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1570',
          thickness: '未知',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '3',
          dielectricDissipationFactor: '0.0013',
          breakdownVoltage: '未知',
          withstandVoltage: '未知',
          electricStrength: '197000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1192',
          grade: 'Kapton 120FWN616B',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1520',
          thickness: '0.0330',
          insulationResistance: '未知',
          volumeResistance: '>1.00E+16',
          dielectricConstant: '2.6@1000Hz',
          dielectricDissipationFactor: '0.001',
          breakdownVoltage: '8316',
          withstandVoltage: '未知',
          electricStrength: '252000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1193',
          grade: 'Kapton 150FWN019',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1680',
          thickness: '0.0380',
          insulationResistance: '未知',
          volumeResistance: '>1.00E+16',
          dielectricConstant: '<3.0@1000Hz',
          dielectricDissipationFactor: '<0.002',
          breakdownVoltage: '>5396',
          withstandVoltage: '未知',
          electricStrength: '>142000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '>350', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '由25.4μm聚酰亚胺薄膜和12.7μm增强型FEP含氟聚合物组合而成',
        },
        {
          parameterId: '1194',
          grade: 'Kapton 150FWR019',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1690',
          thickness: '0.0380',
          insulationResistance: '未知',
          volumeResistance: '2.3E+17',
          dielectricConstant: '2.7@1000Hz',
          dielectricDissipationFactor: '0.0013@1000Hz',
          breakdownVoltage: '6726',
          withstandVoltage: '未知',
          electricStrength: '177000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '由25.4μm聚酰亚胺薄膜和12.7μm增强型FEP含氟聚合物组合而成',
        },
        {
          parameterId: '1195',
          grade: 'Kapton 200FWR919',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1830',
          thickness: '0.0500',
          insulationResistance: '未知',
          volumeResistance: '2.3E+17',
          dielectricConstant: '2.7@1000Hz',
          dielectricDissipationFactor: '0.0013@1000Hz',
          breakdownVoltage: '9850',
          withstandVoltage: '未知',
          electricStrength: '197000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '由25.4μm聚酰亚胺薄膜和12.7μm增强型FEP含氟聚合物组合而成',
        },
        {
          parameterId: '1196',
          grade: 'Kapton HN',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0127',
          insulationResistance: '未知',
          volumeResistance: '1.5E+17',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.0016@1000Hz',
          breakdownVoltage: '4000',
          withstandVoltage: '未知',
          electricStrength: '315000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1197',
          grade: 'Kapton HN',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0250',
          insulationResistance: '未知',
          volumeResistance: '1.5E+17',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.0018@1000Hz',
          breakdownVoltage: '7575',
          withstandVoltage: '未知',
          electricStrength: '303000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1198',
          grade: 'Kapton HN',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0500',
          insulationResistance: '未知',
          volumeResistance: '1.5E+17',
          dielectricConstant: '3.5@1000Hz',
          dielectricDissipationFactor: '0.0020@1000Hz',
          breakdownVoltage: '12000',
          withstandVoltage: '未知',
          electricStrength: '240000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1199',
          grade: 'Kapton HN',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0750',
          insulationResistance: '未知',
          volumeResistance: '1.4E+17',
          dielectricConstant: '3.5@1000Hz',
          dielectricDissipationFactor: '0.0020@1000Hz',
          breakdownVoltage: '15075',
          withstandVoltage: '未知',
          electricStrength: '201000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1200',
          grade: 'Kapton HN',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.1250',
          insulationResistance: '未知',
          volumeResistance: '1E+17',
          dielectricConstant: '3.5@1000Hz',
          dielectricDissipationFactor: '0.0026@1000Hz',
          breakdownVoltage: '19250',
          withstandVoltage: '未知',
          electricStrength: '154000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1201',
          grade: 'Kapton HPP-ST',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0250',
          insulationResistance: '未知',
          volumeResistance: '1.5E+17',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.0018@1000Hz',
          breakdownVoltage: '7575',
          withstandVoltage: '未知',
          electricStrength: '303000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1202',
          grade: 'Kapton HPP-ST',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0500',
          insulationResistance: '未知',
          volumeResistance: '1.5E+17',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.0020@1000Hz',
          breakdownVoltage: '12000',
          withstandVoltage: '未知',
          electricStrength: '240000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1203',
          grade: 'Kapton HPP-ST',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.0750',
          insulationResistance: '未知',
          volumeResistance: '1.4E+17',
          dielectricConstant: '3.5@1000Hz',
          dielectricDissipationFactor: '0.0020@1000Hz',
          breakdownVoltage: '15075',
          withstandVoltage: '未知',
          electricStrength: '201000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1204',
          grade: 'Kapton HPP-ST',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: 'ASTM D-5213',
          type: '薄膜',
          density: '1420',
          thickness: '0.1250',
          insulationResistance: '未知',
          volumeResistance: '1E+17',
          dielectricConstant: '3.5@1000Hz',
          dielectricDissipationFactor: '0.0026@1000Hz',
          breakdownVoltage: '19250',
          withstandVoltage: '未知',
          electricStrength: '154000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '0.2@23℃', 
          glassTransitionTemperature: '360-410', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
        {
          parameterId: '1205',
          grade: 'Kapton 150PRN411',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '1680',
          thickness: '0.0380',
          insulationResistance: '未知',
          volumeResistance: '>1.00E+16',
          dielectricConstant: '3.4@1000Hz',
          dielectricDissipationFactor: '0.0020@1000Hz',
          breakdownVoltage: '8056',
          withstandVoltage: '未知',
          electricStrength: '212000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '由25μmKapton HN聚酰亚胺薄膜夹在10μm和3μm厚的高熔点含氟聚合物中间组成',
        },
        {
          parameterId: '1206',
          grade: 'Kapton 150XP019',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '未知',
          thickness: '0.0380',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '未知',
          dielectricDissipationFactor: '未知',
          breakdownVoltage: '6574',
          withstandVoltage: '未知',
          electricStrength: '173000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '单面或双面涂有专有的氟碳树脂H型薄膜',
        },
        {
          parameterId: '1207',
          grade: 'Kapton 200XP919',
          specification: '片状',
          country: '美国',
          manufacturer: 'DuPont',
          standard: '未知',
          type: '薄膜',
          density: '未知',
          thickness: '0.0500',
          insulationResistance: '未知',
          volumeResistance: '未知',
          dielectricConstant: '未知',
          dielectricDissipationFactor: '未知',
          breakdownVoltage: '9450',
          withstandVoltage: '未知',
          electricStrength: '189000',
          partialDischargeInceptionVoltage: '未知',
          partialDischargeExtinctionVoltage: '未知',
          thermalConductivity: '未知', 
          glassTransitionTemperature: '未知', 
          inDate: '20230112',
          cabinetNumber: '',
          projectGroup: '材料组',
          sampleProducer: '李尚宇',
          remarks: '无',
        },
      ],
      // queryInfo: {
      //   pageNum: 1,
      //   pageSize: 10,
      // },
      queryInfo: {
        pageNum: 1,
        pageSize: 10,
      },
      // sortOptions: [
      //   {
      //     label: '序号',
      //     value: 'index',
      //   },
      //   {
      //     label: '编号',
      //     value: 'parameterId',
      //   },
      //   {
      //     label: '牌号',
      //     value: 'grade',
      //   },
      //   {
      //     label: '样品规格',
      //     value:'specification',
      //   },
      //   {
      //     label: '国别',
      //     value: 'country',
      //   },
      //   {
      //     label: '生产商',
      /*************** 固态信息  *********************/
      importParameter: {
        parameterId: '', //编号
        grade: '', //牌号
        specification: '', //样品规格
        country: '', //国别
        manufacturer: '', //生产商
        standard: '', //执行标准
        type: '', //样品种类
        density: '', //密度
        thickness: '', //厚度
        insulationResistance: '', //绝缘电阻
        volumeResistance: '', //体积电阻
        dielectricConstant: '', //介电常数
        dielectricDissipationFactor: '', //介电常数
        breakdownVoltage: '', //击穿电压
        withstandVoltage: '', //耐受电压
        electricStrength: '', //电气强度
        partialDischargeInceptionVoltage: '', //局部放电起始电压
        partialDischargeExtinctionVoltage: '', //局部放电熄灭电压
        thermalConductivity: '', //导热系数
        glassTransitionTemperature: '', //玻璃化转变温度 ————固态
        inDate: '', //入库日期
        cabinetNumber: '', //样品柜编号
        projectGroup: '', //项目组
        sampleProducer: '', //样品提供人
        remarks: '', //备注
      },
      /*************** 固态信息  *********************/

      /*************** 导入相关字段  *********************/
      importTag: false,
      importflag: '',
      /*************** 导入相关字段  *********************/
      queryInfo: {
        pageNum: 1,
        pageSize: 10,
        userId: JSON.parse(localStorage.getItem('pro__Login_Userinfo')).value.id
      },
      sortValue: '',
      sortOptions: [
        // {
        //   value: '/null',
        //   label: '常规排序'
        // },
        // {
        //   value: '/support',
        //   label: '按点赞数量降序排序'
        // },
        // {
        //   value: '/against',
        //   label: '按踩数量降序排序'
        // },
        // {
        //   value: '/comment',
        //   label: '按评论数量降序排序'
        // }
      ],
      columnTitle: {}, // 表头字段信息
      headerOptions: [],
      headerCondition: [],
    }
  },
  mounted() {
    // this.drawChart()
  },
  created() {
    this.loadData()
    Message({
      message: '需勾选某条具体数据，才可查看下方测量条件和详细信息！',
      type: 'warning',
      center: true,
      customClass: 'myMessageClass'
    })
  },
  methods: {
    loadData() {
      this.parameterListReverse = this.parameterList
      this.parameterListReverse.reverse()
      this.parameterData = this.parameterListReverse
      // console.log("新页面");
    },
    showEdit() {
      Message({
        message: '程序员正在加班中！',
        center: true,
        customClass: 'myMessageClass'
      })
    },
    showImport() {},
    tableGetSortChange(column) {
      console.log(column);
      if (column.order == 'ascending') {
        this.parameterData = this.parameterListReverse
      } else if (column.order == 'descending') {
        this.parameterData = this.parameterList
      } else if (column.order == null) {
        this.parameterData = this.parameterListReverse
      }
      this.parameterList.reverse()
    },
    /*************** 快速查询相关函数  *********************/
    resetQueryKs() {
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.queryNum = 1
      this.loadData()
    },

    getTableFastResult(content) {
      this.queryNum = 3
      this.fastSearchData.content = content
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.$refs.fastSearch.getMySearchHistory()
      this.loadData()
    },
    /*************** 快速查询相关函数  *********************/
    /*************** 选择排序规则相关函数  *********************/
    selectSort(e) {
      this.sort = e
      if (e == '') {
        this.sort = '/null'
      }
      this.loadData()
    },
    /*************** 选择排序规则相关函数  *********************/

    /*************** 快速查询相关函数  *********************/
    resetQueryKs() {
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.queryNum = 1
      this.loadData()
    },

    getTableFastResult(content) {
      this.queryNum = 3
      this.fastSearchData.content = content
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.$refs.fastSearch.getMySearchHistory()
      this.loadData()
    },
    /*************** 快速查询相关函数  *********************/

    /*************** 高级查询相关函数  *********************/
    resetQuery() {
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.queryNum = 1
      this.loadData()
    },
    //获取高级查询组件查询结果
    getTableInquiryResult(queryArray, andOr) {
      this.queryNum = 2
      this.advancedSearchData.queryArray = queryArray
      this.advancedSearchData.andOr = andOr
      this.queryInfo.pageNum = 1
      this.queryInfo.pageSize = 10
      this.loadData()
    },
    //获取主表的ref信息
    getTableRef() {
      this.$refs.advancedSearch.getTableColumn(this.$refs.jueYuanTable) //括号内的ref名字记得根据不同表进行修改
    },
    /*************** 高级查询相关函数  *********************/

    /*************** 导入相关函数  *********************/
    showImport(tag, index) {
      this.importTag = true
      this.importflag = tag
      this.fileFlag = index
    },
    // showEdit(tag) {
    //   this.importflag = tag
    //   this.showDataImport()
    // },
    showDataImport() {},
    // 获取elements表头
    getTableColumn() {
      //通过ref获取el-table的表头数据
      let columnTitle = this.$refs.jueYuanTable.$children
        .filter(x => {
          return x._props.prop !== undefined
        })
        .map(x => {
          return new Object({
            value: x._props.prop,
            label: x._props.label
          })
        })
      this.headerOptions = columnTitle
      this.headerCondition.push(columnTitle)
    },
    single() {
      //单个导入
      //通过ref获取el-table的表头数据
      this.getTableColumn()
      this.columnTitle = this.$refs.jueYuanTable.$children
        .filter(x => {
          return x._props.prop !== undefined
        })
        .map(x => {
          return new Object({
            prop: x._props.prop,
            label: x._props.label
          })
        })
      this.$refs.singleImportNew.getEditRowAndColumn(this.columnTitle)
      console.log("this.columnTitle",this.columnTitle);
    },
    handleChange(info) {},
    attHandleChange(info) {},
    /*************** 导入相关函数  *********************/
    downloadAttachment(dataName) {
      console.log('dataName----', dataName)
      this.axios({
        baseURL: 'http://59.172.104.174:30669',
        url: '/attachmentUpload/downLoadAttachmentFile',
        method: 'GET',
        params: {
          filename: dataName
        },
        responseType: 'blob' // 表明返回服务器返回的数据类型
      }).then(res => {
        let blob = new Blob([res.data])
        let fileName = dataName
        if (window.navigator.msSaveOrOpenBlob) {
          navigator.msSaveBlob(blob, fileName)
        } else {
          var link = document.createElement('a')
          link.href = window.URL.createObjectURL(blob)
          link.download = fileName
          link.click()
          //释放内存
          window.URL.revokeObjectURL(link.href)
        }
      })
    },
    downLoadFileName(dataName) {
      console.log('dataName', dataName)
      if(dataName == '未知' || dataName == '') {
        Message({
          message: '数据库暂未收录该消息，欢迎使用附件上传',
          type: 'warning',
          center: true,
          customClass: 'mzindex',
        })
        return
      }
      this.axios({
        baseURL: 'http://59.172.104.174:31770',
        url: '/basicsExecutionStandard/getFilenameByNumber',
        method: 'GET',
        params: {
          number: dataName
        },
      }).then(res => {
        console.log('res----', res.data.result.filename)
        if(res.data.result.filename != '' && res.data.result.filename != null){
          this.downloadAttachment(res.data.result.filename)
        } else {
          Message({
            message: '数据库暂未收录该消息，欢迎使用附件上传',
            type: 'warning',
            center: true,
            customClass: 'mzindex',
          })
        }
      })
    },
  },
}
</script>

<style scoped>
.myMessageClass{
  z-index: 5000 !important;
}
.box {
  margin-top: 10px;
  display: flex;
  /* justify-content: space-between; */
}
.el-divider--horizontal {
  font-weight: 100;
  display: block;
  height: 1px;
  width: 100%;
  margin: 10px 0;
}
/*去除顶部标头的选择框*/
.el-table >>> .DisabledSelection .cell .el-checkbox__inner {
  display: none;
  position: relative;
}

/*修改el-table中排序小三角样式*/
::v-deep .el-table .caret-wrapper {
  height: 45px;
}
::v-deep .el-table .sort-caret {
  border: 7px solid transparent;
}
::v-deep .el-table .sort-caret.ascending {
  border-bottom-color: #c0c4cc;
  top: 5px;
}
::v-deep .el-table .sort-caret.descending {
  border-top-color: #c0c4cc;
  bottom: 7px;
}
::v-deep .descending .sort-caret.descending {
  border-top-color: #4e9efd;
}
::v-deep .ascending .sort-caret.ascending {
  border-bottom-color: #4e9efd;
}
</style>

<style lang="less" scoped>
/deep/.mainTable.el-table th > .cell {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  white-space: nowrap;
  -webkit-box-orient: vertical;
  word-break: break-all;
  height: 50px;
  line-height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}
/deep/.mainTable.el-table--border th.el-table__cell, .mainTable.el-table__fixed-right-patch {
  background: rgb(250, 250, 250);
}
.mainTable{
  /deep/.caret-wrapper {
    display: none;
  }
  /deep/.sortableShow .caret-wrapper {
    display: block;
  }
}
/deep/.mainTable.el-table__fixed-right {
  border-left: 1px solid #ebeef5;
}
</style>

